Re: [SQL] parts of date_part()

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Re: [SQL] parts of date_part()
Дата
Msg-id l03110704b2097cbdee1a@[147.233.159.109]
обсуждение исходный текст
Ответ на parts of date_part()  (Eric McKeown <ericm@palaver.net>)
Ответы Re: [SQL] parts of date_part()  (Leslie Mikesell <les@Mcs.Net>)
Список pgsql-sql
At 2:33 +0300 on 25/8/98, Eric McKeown wrote:


>
> Well, I've done some digging in the FAQ, the user documentation, and the
> man pages, so I hope nobody screams 'RTFM' on this question, but I suppose
> you're welcome to if it was somewhere obvious and I missed it.
>
> I'm looking for a complete list of the different "date parts" that I can
> use to extract information about a given datetime value in a table.

Actually, it is an RTFM...

From the manpage of pgbuiltin (my postgres version is 6.2.1):

     For the date_part() and  date_trunc()  functions,  arguments
     can   be  `year',  `month',  `day',  `hour',  `minute',  and
     `second',  as  well  as  the  more  specialized   quantities
     `decade',   `century',   `millenium',   `millisecond',   and
     `microsecond'.  date_part() allows `dow' to  return  day  of
     week  and  `epoch' to return seconds since 1970 for datetime
     and 'epoch' to return total elapsed seconds for timespan.

So...

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



В списке pgsql-sql по дате отправления:

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: Re: [SQL] copying rows
Следующее
От: David Hartwig
Дата:
Сообщение: Re: [SQL] excel vs. money data type?